package com.effectiv.gooruda.rest.api.controller;

import org.springframework.social.facebook.api.Checkin;
import org.springframework.social.facebook.api.Facebook;
import org.springframework.social.facebook.api.Page;
import org.springframework.social.facebook.api.PagedList;
import org.springframework.social.facebook.api.PagingParameters;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/api/facebook/places")
public class FacebookPlacesOperations  {

	
	public String checkin(String placeId, double latitude, double longitude, Facebook facebook) {
		return facebook.placesOperations().checkin(placeId, latitude, longitude);
	}

	
	public String checkin(Facebook facebook,  String placeId, double latitude, double longitude, String message,
			String... tags) {
		return facebook.placesOperations().checkin(placeId, latitude, longitude, message, tags);
	}

	
	public Checkin getCheckin(String checkinId, Facebook facebook) {
		return facebook.placesOperations().getCheckin(checkinId);
	}

	
	public PagedList<Checkin> getCheckins(Facebook facebook) {
		return facebook.placesOperations().getCheckins();
	}

	
	public PagedList<Checkin> getCheckins(PagingParameters pagedListParameters, Facebook facebook) {
		return facebook.placesOperations().getCheckins(pagedListParameters);
	}

	
	public PagedList<Checkin> getCheckins(String objectId, Facebook facebook) {
		return facebook.placesOperations().getCheckins(objectId);
	}

	
	public PagedList<Checkin> getCheckins(String objectId, PagingParameters pagedListParameters, Facebook facebook) {
		return facebook.placesOperations().getCheckins(objectId, pagedListParameters);
	}

	public PagedList<Page> search(String query, double latitude, double longitude,
			long distance, Facebook facebook) {
		return facebook.placesOperations().search(query, latitude, longitude, distance)
;	}

}
